import jenkins.model.*

Jenkins.instance.setNumExecutors(5)
